package com.jerry.huihome.module.home.activity;

import android.content.Intent;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.jerry.huihome.R;
import com.jerry.huihome.base.BaseActivity;

import butterknife.BindView;
import butterknife.OnClick;

public class LoreDetailBannerActivity extends BaseActivity{

    @BindView(R.id.webView_detail_banner)
    protected WebView webView;

    @Override
    protected int getLayoutId(){
        return R.layout.activity_lore_detail_banner;
    }

    @Override
    protected void initViews(){
        Intent intent = getIntent();
        final String address = intent.getStringExtra("address");
        webView.loadUrl(address);
        webView.setWebViewClient(new WebViewClient(){
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url){
                view.loadUrl(url);
                return true;
            }
        });
        WebSettings settings = webView.getSettings();
        settings.setJavaScriptEnabled(true);
    }

    @Override
    protected void loadData(){
    }

    @OnClick(value = {R.id.tv1, R.id.tv2})
    protected void loreDetail(){
        finish();
    }
}
